<template>
  <div class="contentmain">
      <el-row>
          <el-col>
              <el-form class="demo-form-inline" :inline="true" v-model="fi">
                    <el-form-item style="float:right">
                        <el-button type="primary" @click="search">搜索</el-button>
                    </el-form-item>
                    <el-form-item style="float:right">
                        <el-date-picker
                        v-model="fi.value4"
                        type="datetimerange"
                        range-separator="至"
                        start-placeholder="开始日期"
                        end-placeholder="结束日期"
                        :default-time="['00:00:00', '23:59:59']">
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item style="float:right">
                        <el-select v-model="fi.orderType" placeholder="购买类型">
                            <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item style="float:right">
                        <el-select v-model="fi.deliveryType" placeholder="配送方式">
                            <el-option
                            v-for="item in options2"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item style="float:right">
                        <el-input v-model="fi.userphone" type="number" placeholder="用户手机号"></el-input>
                    </el-form-item>
                    <el-form-item style="float:right">
                        <el-input v-model="fi.orderid" type="number" placeholder="订单编号"></el-input>
                    </el-form-item>
                    <!-- <el-form-item style="float:right">
                        <el-input v-model="fi.goodid" type="number" placeholder="商品编号"></el-input>
                    </el-form-item> -->
              </el-form>
          </el-col>
      </el-row>


<el-row>
    <el-col :span="24">
        <el-tabs v-model="activeName" @tab-click="handleClick" style="width:100%">
            <el-tab-pane label="全部订单" name="0" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu"></el-tab-pane>
            <el-tab-pane label="待付款" name="1" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu"></el-tab-pane>
            <el-tab-pane label="拼团中" name="2" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu"></el-tab-pane>
            <el-tab-pane label="待发货" name="3" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu"></el-tab-pane>
            <el-tab-pane label="待收货" name="4" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu"></el-tab-pane>
            <el-tab-pane label="已完成" name="5" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu"></el-tab-pane>
            <el-tab-pane label="已取消" name="6" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu"></el-tab-pane>
            <el-tab-pane label="未成团" name="7" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu"></el-tab-pane>
            <el-tab-pane label="退款成功" name="8" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu||shiroitem.caiwu"></el-tab-pane>
            <el-tab-pane label="退款审核" name="9" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu||shiroitem.caiwu"></el-tab-pane>
            <el-tab-pane label="退款失败" name="10" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu||shiroitem.caiwu"></el-tab-pane>
        </el-tabs>
    </el-col>
</el-row>
    


    <!-- 分栏 -->
    <el-table class="table-data" :data="td" stripe border style="width: 100%;"
                  highlight-current-row
                  @selection-change="handleSelectionChange"
                  v-loading="loading"
                  element-loading-text="数据加载中..." >
            <el-table-column type="selection"></el-table-column>
            <el-table-column label="订单编号" width="300" prop="orderCode">
                <template slot-scope="scope">
                    <span style="margin-left: 10px">{{ scope.row.orderCode }}</span>
                    <el-tag v-if="scope.row.payType == 1" type="success">微信支付</el-tag>
                    <el-tag v-if="scope.row.payType == 2" type="primary">支付宝支付</el-tag>
                    <el-tag v-if="scope.row.payType == 4" type="warning">预存款支付</el-tag>
                    <el-tag v-if="scope.row.payType == 5" type="danger">货到付款</el-tag>
                    <el-tag v-if="scope.row.payType == 6" type="danger">现金</el-tag>
                    <el-tag v-if="scope.row.payType == 7" type="danger">第三方支付</el-tag>
                </template>
            </el-table-column>

            <el-table-column label="订单来源" width="180">
                <template slot-scope="scope">
                    <el-tag type="success">{{scope.row.tag1}}</el-tag>
                    <el-tag type="primary" v-if="scope.row.tag2!=undefined">{{scope.row.tag2}}</el-tag>
                </template>
            </el-table-column>

            <el-table-column  label="买家信息" >
                <template slot-scope="scope">
                    <span style="margin-left: 10px">{{ scope.row.contactPersion }}<br/>{{scope.row.contactMobile}}</span>
                </template>
            </el-table-column>
            
            <el-table-column label="下单时间" >
                <template slot-scope="scope">
                    <span style="margin-left: 10px">{{ new Date(scope.row.createTime).toLocaleString().replace(/:\d{1,2}$/,' ') }}</span>
                </template>
            </el-table-column>
            <el-table-column label="订单状态" >
                <template slot-scope="scope">
                    <el-tag v-if="scope.row.orderStatus == 0" type="gray">待付款</el-tag>
                    <el-tag v-if="scope.row.orderStatus == 1" type="primary">拼团中</el-tag>
                    <el-tag v-if="scope.row.orderStatus == 2" type="primary">待发货</el-tag>
                    <el-tag v-if="scope.row.orderStatus == 3" type="primary">待收货</el-tag>
                    <el-tag v-if="scope.row.orderStatus == 4" type="success">已完成</el-tag>
                    <el-tag v-if="scope.row.orderStatus == 5" type="warning">已取消</el-tag>
                    <el-tag v-if="scope.row.orderStatus == 6" type="warning">未成团</el-tag>
                    <el-tag v-if="scope.row.orderStatus == 7" type="danger">已退款</el-tag>
                    <el-tag v-if="scope.row.orderStatus == 8" type="danger">退款审核中</el-tag>
                    <el-tag v-if="scope.row.orderStatus == 9" type="danger">退款失败</el-tag>
                </template>
            </el-table-column>

            <el-table-column label="总价" >
                <template slot-scope="scope">
                    <span v-if="scope.row.deliveryType == '0'">{{scope.row.orderOldPrice}}</span>
                    <span v-if="scope.row.deliveryType == '1'">{{scope.row.orderPrice}}</span>
                </template>
            </el-table-column>

            <el-table-column prop="orderPrice" label="实付金额" ></el-table-column>

            <el-table-column label="配送方式">
                <template slot-scope="scope">
                    <el-tag v-if="scope.row.deliveryType == 0" type="success">快递</el-tag>
                    <el-tag v-if="scope.row.deliveryType == 1" type="primary">自提</el-tag>
                </template>
            </el-table-column>
            <el-table-column prop="refundApplication" label="退款金额" v-if="activeName == '8'||activeName == '9'||activeName == '10'"></el-table-column>
            <el-table-column label="操作" width="260">
                <template slot-scope="scope">
                    <el-button type="primary" style="float:left" size="mini" @click="showDialogTable(scope.row)">查看详情</el-button>
                    <el-button style="float:left" v-if="scope.row.orderStatus == 2&&!shiroitem.caiwu" type="success" size="mini" @click="deliverThisOrder(scope.row.orderId)">一键发货</el-button>
                    <el-button type="danger" style="float:left" size="mini" @click="tuikuansheng(scope.row)" v-if="tuikuanshengqing(scope.row)">退款申请</el-button>
                    <el-button type="danger" style="float:left" size="mini" @click="tuikuan(scope.row)" v-if="shiroitem.caiwu&&scope.row.orderStatus==8">确认退款</el-button>
                    <el-button size="mini" style="float:left" @click="Refused(scope.row)" v-if="shiroitem.caiwu&&scope.row.orderStatus==8">拒绝</el-button>
                </template>
            </el-table-column>
        </el-table>
    <!-- 表格 -->

    <el-row>
        <el-col :span="8" :offset="16">
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-size="10"
              layout="total, prev, pager, next, jumper"
              :total="ClassCount">
            </el-pagination>
        </el-col>
      </el-row>
        <OrderDetial>
        </OrderDetial>
        <Refund />
  </div>
</template>
<script>
import axios from 'axios'
import moment from 'moment'
import lockr from 'lockr'
import OrderDetial from 'components/OrderDetial/OrderDetial'
import Refund from 'components/OrderDetial/Refund'
import { parse } from 'babylon';
    export default {
    data() {
      return {
        shiroitem:this.$store.state.shiroitem,
        activeName: '0',
        t: [],
        //mask
        loading: false,
        options:[{
            label:"订单来源-全部",
            value:-1
        },{
            label:"拼团",
            value:1
        },{
            label:"正常购买",
            value:0
        },{
            label:"快捷支付",
            value:3
        },{
            label:"现金",
            value:4
        },{
            label:"第三方支付",
            value:5
        }],
        options2:[{
            label:"配送方式-全部",
            value:-1
        },{
            label:"快递",
            value:0
        },{
            label:"自提",
            value:1
        }],
        //状态
        activeName:'00',
        beforeClick:'',
        //查询
        searchForm: {
            orderNum: '',
            phoneNum: '',
            beginTime: '',
            endTime : ''
        },
        ClassCount:0,
        dialogTableVisible: false,
        orderDetail:[],
        //分页
        pageNo: 1,
        totalNumber: 0,
        pageSize: 10,

        selections: [],
        
        valueShop:'',
        currentPage:1,
        OrderStateClass:0,
        fi:{
            goodid:'',
            orderid:'',
            userphone:'',
            deliveryType:-1,
            orderType:-1,
            orderType:-1,
            value4: ''
        }
      };
    },
    components:{//组件dialog
        OrderDetial,
        Refund
    },
    computed:{
        getstate(){
            return this.$store.state.ordertuikuandialog;
        },
        getshop(){
            return this.$store.state.TOPshopID
        }
    },
    watch:{
        getstate(v){
            // if(!this.$store.state.shiro&&this.$store.state.TOPshopID!=''){
            //     console.log("申请发起2",this.$store.state.ordertuikuandialog)
            //     var pw=new URLSearchParams()
            //     pw.append('shopId',this.$store.state.TOPshopID)
            //     this.getData(pw)
            // }else{
            //     this.getData()
            // }
            // this.activeName='0'
            if(!v){
                this.$store.state.ordertuikuandialog=true
                history.go(0)
            }
        },
        getshop(v){
            var bool=true
            var pn=new URLSearchParams()
            if(this.$store.state.TOPshopID!=''&&this.$store.state.TOPshopID!=-1){
                pn.append('shopId',this.$store.state.TOPshopID)
            }
            // if(this.fi.goodid!=''){
            //     pn.append('goodId',this.fi.goodid)
            // }
            if(this.fi.orderid!=''){
                pn.append('orderCode',this.fi.orderid)
            }
            if(this.fi.userphone!=''){
                pn.append('contactMobile',this.fi.userphone)
            }
            if(this.fi.deliveryType!=''&&this.fi.deliveryType!=-1&&this.fi.deliveryType!=3){
                pn.append('deliveryType',this.fi.deliveryType)
            }else if(this.fi.deliveryType==0){
                pn.append('deliveryType',0)
            }
            if(this.fi.deliveryType==3){
                pn.append('orderType',3)
            }
            if(this.fi.orderType!=''&&this.fi.orderType!=undefined&&this.fi.orderType!=-1){
                pn.append('orderType',this.fi.orderType)
            }else if(this.fi.orderType==0){
                pn.append('orderType',0)
            }
            // console.log(this.fi.value4)
            if(this.fi.value4!=''&&this.fi.value4!=null&&typeof(this.fi.value4)!="undefined"){
                pn.append('createTime',moment(new Date(this.fi.value4[0])).format("YYYY-MM-DD HH:mm:ss"))
                pn.append('endTime',moment(new Date(this.fi.value4[1])).format("YYYY-MM-DD HH:mm:ss"))
            }

            if(parseInt(this.activeName)>0||this.$store.state.shiroitem.caiwu){
                pn.append("orderStatus",parseInt(this.activeName)-1);
            }
            this.getData(pn)
        }
    },
    mounted(){//按权限判断是否需要带id请求数据,当前店长只能看到自己的数据
        if(this.$store.state.TOPshopID!=''&&this.$store.state.TOPshopID!=-1){
            var pw=new URLSearchParams()
            pw.append('shopId',this.$store.state.TOPshopID)
            this.getData(pw)
            this.activeName='0'
        }else{
            if(this.$store.state.shiroitem.caiwu){
                var pp=new URLSearchParams()
                pp.append("orderStatus",8)
                this.getData(pp)
                this.activeName='9'
            }else{
                this.getData()
                this.activeName='0'
            }
        }
    },
    methods: {
        Refused(r){//拒绝
            var _this=this
            this.$confirm('是否拒绝退款？?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
                }).then(()=>{
                    var pp=new URLSearchParams()
                    pp.append('orderCode',r.orderCode)
                    axios.get('/refusedToARefund.do',{params:pp}).then(r=>{
                        if(r.data.code==200){
                            _this.$message.success('已拒绝')
                            var pp=new URLSearchParams()
                            pp.append("orderStatus",8)
                            _this.getData(pp)
                        }else{
                            _this.$message.error(r.data.message)
                        }
                    })
                })
        },
        tuikuanshengqing(ord){
            // scope.row.orderStatus==3||scope.row.orderStatus==4&&shiroitem.admin||shiroitem.kefu
            if(this.shiroitem.admin||this.shiroitem.kefu){
                if(ord.orderStatus==3||ord.orderStatus==4){
                    if(ord.tag2!=undefined){
                        if(ord.tag2.indexOf('现金')==-1&&ord.tag2.indexOf('第三方支付')==-1){
                            return true
                        }
                    }
                }
            }
            return false
        },
        tuikuansheng(r){
            this.$store.commit('ChangeOrderRefund',r)
        },
        tuikuan(r){//退款
        var _this=this
            this.$confirm('是否确认退款？?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
                }).then(() => {
                    var pt=new URLSearchParams()
                    pt.append('orderCode',r.orderCode)
                    pt.append('userName',lockr.get('username'))
                    axios.get('/refundByOrderId.do',{params:pt}).then(r=>{
                        if(r.data.code==200){
                            _this.$message.success('退款成功')
                            var pp=new URLSearchParams()
                            pp.append("orderStatus",8)
                            _this.getData(pp)
                        }else{
                            _this.$message.error(r.data.message)
                        }
                    }).catch(e=>{
                        _this.$message.error(e)
                    })
                }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '已取消删除'
                });          
                });
            // this.$store.commit('ChangeOrderRefund',r)
            
        },
        search(){//搜索,需要带id请求,因为搜索条件不一定都有,所以需要判断有哪些条件
            // console.log("this zero",this.fi.deliveryType,this.fi.orderType)
            var bool=true
            var pn=new URLSearchParams()
            if(this.$store.state.TOPshopID!=''&&this.$store.state.TOPshopID!=-1){
                pn.append('shopId',this.$store.state.TOPshopID)
            }
            // if(this.fi.goodid!=''){
            //     pn.append('goodId',this.fi.goodid)
            // }
            if(this.fi.orderid!=''){
                pn.append('orderCode',this.fi.orderid)
                bool=false
            }
            if(this.fi.userphone!=''){
                pn.append('contactMobile',this.fi.userphone)
                bool=false
            }
            if(this.fi.deliveryType!=''&&this.fi.deliveryType!=-1&&this.fi.deliveryType!=3){
                pn.append('deliveryType',this.fi.deliveryType)
                bool=false
            }else if(this.fi.deliveryType==0){
                pn.append('deliveryType',0)
                bool=false
            }
            if(this.fi.deliveryType==3){
                pn.append('orderType',3)
                bool=false
            }
            if(this.fi.orderType!=''&&this.fi.orderType!=undefined&&this.fi.orderType!=-1){
                pn.append('orderType',this.fi.orderType)
                bool=false
            }else if(this.fi.orderType==0){
                pn.append('orderType',0)
                bool=false
            }
            // console.log(this.fi.value4)
            if(this.fi.value4!=''&&this.fi.value4!=null&&typeof(this.fi.value4)!="undefined"){
                pn.append('createTime',moment(new Date(this.fi.value4[0])).format("YYYY-MM-DD HH:mm:ss"))
                pn.append('endTime',moment(new Date(this.fi.value4[1])).format("YYYY-MM-DD HH:mm:ss"))
                bool=false
            }

            if(parseInt(this.activeName)>0||this.$store.state.shiroitem.caiwu){
                pn.append("orderStatus",parseInt(this.activeName)-1);
            }
            this.getData(pn)
        },
        deliverThisOrder(i){//一键发货
            var _this=this
            var pp=new URLSearchParams()
            pp.append('orderId',i)
            axios.get('/deliverXcxOrder.do',{params:pp}).then(r=>{
                if(r.data.code==200){
                    _this.$message.success("发货成功")
                    var param = new URLSearchParams();
                    if(!this.$store.state.shiro&&this.$store.state.TOPshopID!=''){
                        param.append('shopId',this.$store.state.TOPshopID)
                    }
                    _this.getData(param)
                }else{  
                    _this.$message.error(r.data.message)
                }
            })
        },
      handleClick(tab, event) {//选择类型
            this.OrderStateClass=tab.index
            var param = new URLSearchParams();
            if(tab.index!=0||this.$store.state.shiroitem.caiwu){
                param.append("orderStatus",tab.name-1);
            }
            if(this.$store.state.TOPshopID!=''&&this.$store.state.TOPshopID!=-1){
                param.append('shopId',this.$store.state.TOPshopID)
            }

            if(this.fi.orderid!=''){
                param.append('orderCode',this.fi.orderid)
            }
            if(this.fi.userphone!=''){
                param.append('contactMobile',this.fi.userphone)
            }

            if(this.fi.deliveryType!=''&&this.fi.deliveryType!=-1&&this.fi.deliveryType!=3){
                param.append('deliveryType',this.fi.deliveryType)
            }else if(this.fi.deliveryType==0){
                param.append('deliveryType',0)
            }
            if(this.fi.deliveryType==3){
                param.append('orderType',3)
            }
            if(this.fi.orderType!=''&&this.fi.orderType!=undefined&&this.fi.orderType!=-1){
                param.append('orderType',this.fi.orderType)
            }else if(this.fi.orderType==0){
                param.append('orderType',0)
            }

            if(this.fi.value4!=''&&this.fi.value4!=null&&typeof(this.fi.value4)!="undefined"){
                param.append('createTime',moment(new Date(this.fi.value4[0])).format("YYYY-MM-DD HH:mm:ss"))
                param.append('endTime',moment(new Date(this.fi.value4[1])).format("YYYY-MM-DD HH:mm:ss"))
            }
            this.getData(param)
      },
      handleSelectionChange(){//表格的选择框,暂时没用

      },
      handleSizeChange(i){//翻页的时候需要带页数(固定),搜索参数(不固定)进行翻页请求数据
      var bool=true
        var param = new URLSearchParams();
        param.append("pageNo",i);
        if(this.$store.state.TOPshopID!=''&&this.$store.state.TOPshopID!=-1){
            param.append('shopId',this.$store.state.TOPshopID)
        }
        // if(this.fi.goodid!=''){
        //     param.append('goodId',this.fi.goodid)
        // }
        if(this.fi.orderid!=''){
            param.append('orderCode',this.fi.orderid)
            bool=false
        }
        if(this.fi.userphone!=''){
            param.append('contactMobile',this.fi.userphone)
            bool=false
        }

        if(this.fi.deliveryType!=''&&this.fi.deliveryType!=-1&&this.fi.deliveryType!=3){
            param.append('deliveryType',this.fi.deliveryType)
            bool=false
        }else if(this.fi.deliveryType==0){
            param.append('deliveryType',0)
            bool=false
        }
        if(this.fi.deliveryType==3){
            param.append('orderType',3)
            bool=false
        }
        if(this.fi.orderType!=''&&this.fi.orderType!=undefined&&this.fi.orderType!=-1){
            param.append('orderType',this.fi.orderType)
            bool=false
        }else if(this.fi.orderType==0){
            param.append('orderType',0)
            bool=false
        }

        if(this.fi.value4!=''&&this.fi.value4!=null&&typeof(this.fi.value4)!="undefined"){
            param.append('createTime',moment(new Date(this.fi.value4[0])).format("YYYY-MM-DD HH:mm:ss"))
            param.append('endTime',moment(new Date(this.fi.value4[1])).format("YYYY-MM-DD HH:mm:ss"))
            bool=false
        }
        // if(bool){
            if(this.OrderStateClass>0){
                param.append("orderStatus",this.OrderStateClass-1);
            }
        // }
        this.getData(param)
      },
      handleCurrentChange(i){//翻页的时候需要带页数(固定),搜索参数(不固定)进行翻页请求数据
        var bool=true
        var param = new URLSearchParams();
        param.append("pageNo",i);
        if(this.$store.state.TOPshopID!=''&&this.$store.state.TOPshopID!=-1){
            param.append('shopId',this.$store.state.TOPshopID)
        }
        // if(this.fi.goodid!=''){
        //     param.append('goodId',this.fi.goodid)
        // }
        if(this.fi.orderid!=''){
            param.append('orderCode',this.fi.orderid)
            bool=false
        }
        if(this.fi.userphone!=''){
            param.append('contactMobile',this.fi.userphone)
            bool=false
        }
        if(this.fi.deliveryType!=''&&this.fi.deliveryType!=-1&&this.fi.deliveryType!=3){
            param.append('deliveryType',this.fi.deliveryType)
            bool=false
        }else if(this.fi.deliveryType==0){
            param.append('deliveryType',0)
            bool=false
        }
        if(this.fi.deliveryType==3){
            param.append('orderType',3)
            bool=false
        }
        if(this.fi.orderType!=''&&this.fi.orderType!=undefined&&this.fi.orderType!=-1){
            param.append('orderType',this.fi.orderType)
            bool=false
        }else if(this.fi.orderType==0){
            param.append('orderType',0)
            bool=false
        }
        if(this.fi.value4!=''&&this.fi.value4!=null&&typeof(this.fi.value4)!="undefined"){
            param.append('createTime',moment(new Date(this.fi.value4[0])).format("YYYY-MM-DD HH:mm:ss"))
            param.append('endTime',moment(new Date(this.fi.value4[1])).format("YYYY-MM-DD HH:mm:ss"))
            bool=false
        }
        if(this.OrderStateClass>0){
            param.append("orderStatus",this.OrderStateClass-1);
        }
        this.getData(param)
      },
      showDialogTable(n){//因为需要请求单个商品的内容,所以带ID参数先请求,然后在带参数请求dialog
        //   console.log('showDialogTable',n)
        var param = new URLSearchParams();
        if(n.goodId!=null||n.goodId!=undefined||n.goodId!=''){
            param.append("xcxOrderId",n.orderId);
        }
        var _this=this
        var f={}
        axios.get('/getXcxOrderByOrderId.do',{params: param}).then(r=>{
            if(r.data.code==200){
                _this.opendialog(r.data.response.xcxOrder)
            }else{
                _this.$message.error(r.data.message)
            }
        })
      },
      opendialog(n){//dialog弹窗
          this.$store.commit('ChangeOrderDetial',n)
      },
      changesource(){//截取字符串
            for(var i=0;i<this.td.length;i++){
                var source=this.td[i].source
                var arr=[]
                arr=source.split("-")
                this.td[i].tag1=arr[0]
                this.td[i].tag2=arr[1]
            }
        },
      getData(v){//统一获取数据,
        var _this=this;
        this.loading=true
        this.td=new Array()
        // console.log(v)
        axios.get('/listXcxOrder.do',{params: v }).then(r=>{
            // console.log(r)
            _this.loading=false
            if(r.data.message=="not login"&&r.data.code==500){//权限拦截
                this.$message.error("访问者,请登录")
                router.push('/Login');
                return
            }
            if(r.data.code!=200){
                _this.$message.error(r.data.message)
                return
            }
            // _this.td.push(r.data.response.xcxOrderList)
            _this.td=[].concat(r.data.response.xcxOrderList)
            _this.changesource()
            _this.ClassCount=r.data.response.page.totalCount
            // console.log(_this.td)
        })
      }
    }
  };
</script>
<style>

</style>
